Extra deploy for additional manifests#293
Conversation
📝 WalkthroughWalkthroughAdds a new Changes
Sequence Diagram(s)(omitted — changes are template + docs and do not introduce multi-component runtime control flow) Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In @charts/meilisearch/templates/extra-deploy.yaml:
- Around line 1-8: The template references the wrong value name and injects
extra leading spaces into rendered manifests; change .Values.extraDeploy to
.Values.extraDeploys and remove the leading spaces before the tpl calls so the
lines reading tpl . $ and tpl (. | toYaml) $ are not indented (keep the '---'
separator line intact), ensuring the range over the correct values key and that
tpl output is emitted without unwanted leading whitespace.
In @charts/meilisearch/values.yaml:
- Around line 182-183: The Helm values key is misnamed: values.yaml defines
extraDeploys (plural) but the chart template extra-deploy.yaml reads
.Values.extraDeploy (singular), so the template never receives the data; fix by
either renaming the values key from extraDeploys to extraDeploy to match the
template, or update the template (extra-deploy.yaml) to reference
.Values.extraDeploys (plural) wherever used; ensure the symbol names
(extraDeploys or extraDeploy) are consistent between values and template.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
charts/meilisearch/README.mdcharts/meilisearch/templates/extra-deploy.yamlcharts/meilisearch/values.yaml
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
charts/meilisearch/README.md
120-120: Bare URL used
(MD034, no-bare-urls)
🪛 YAMLlint (1.37.1)
charts/meilisearch/templates/extra-deploy.yaml
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
🔇 Additional comments (2)
charts/meilisearch/README.md (2)
66-66: Documentation reflectsextraDeploys(plural).This documentation matches
values.yamlbut not the template. After resolving the naming mismatch betweenextraDeploysandextraDeploy, regenerate this README usinghelm-docsto ensure consistency.
5-5: Documentation updates look good.The helm-docs regeneration properly captures the new and updated chart values including version bumps and new configuration options.
Also applies to: 71-71, 78-78, 89-89, 99-99, 111-111, 114-114, 119-119, 121-121, 133-133
| {{- range .Values.extraDeploy }} | ||
| --- | ||
| {{- if typeIs "string" . }} | ||
| {{ tpl . $ }} | ||
| {{- else }} | ||
| {{ tpl (. | toYaml) $ }} | ||
| {{- end }} | ||
| {{- end }} |
There was a problem hiding this comment.
Fix whitespace handling to avoid malformed YAML output.
Two issues with this template:
-
Naming mismatch: References
.Values.extraDeploybutvalues.yamldefinesextraDeploys(covered in values.yaml comment). -
Leading whitespace: Lines 4 and 6 have leading spaces that will be included in the rendered output, causing indentation issues in the generated manifests.
🐛 Proposed fix
{{- range .Values.extraDeploy }}
---
-{{- if typeIs "string" . }}
- {{ tpl . $ }}
-{{- else }}
- {{ tpl (. | toYaml) $ }}
-{{- end }}
+{{ if typeIs "string" . }}
+{{ tpl . $ }}
+{{- else }}
+{{ tpl (toYaml .) $ }}
+{{- end }}
{{- end }}Note: The YAMLlint syntax error is a false positive since this is a Helm template, not a standalone YAML file.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| {{- range .Values.extraDeploy }} | |
| --- | |
| {{- if typeIs "string" . }} | |
| {{ tpl . $ }} | |
| {{- else }} | |
| {{ tpl (. | toYaml) $ }} | |
| {{- end }} | |
| {{- end }} | |
| {{- range .Values.extraDeploy }} | |
| --- | |
| {{ if typeIs "string" . }} | |
| {{ tpl . $ }} | |
| {{- else }} | |
| {{ tpl (toYaml .) $ }} | |
| {{- end }} | |
| {{- end }} |
🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
🤖 Prompt for AI Agents
In @charts/meilisearch/templates/extra-deploy.yaml around lines 1 - 8, The
template references the wrong value name and injects extra leading spaces into
rendered manifests; change .Values.extraDeploy to .Values.extraDeploys and
remove the leading spaces before the tpl calls so the lines reading tpl . $ and
tpl (. | toYaml) $ are not indented (keep the '---' separator line intact),
ensuring the range over the correct values key and that tpl output is emitted
without unwanted leading whitespace.
|
Hi there, can you update the chart version? This way we can proceed with the merge :) |
| | envFrom | list | `[]` | Additional environment variables from ConfigMap or secrets | | ||
| | environment.MEILI_ENV | string | `"development"` | Sets the environment. Either **production** or **development** | | ||
| | environment.MEILI_NO_ANALYTICS | bool | `true` | Deactivates analytics | | ||
| | extraDeploys | list | `[]` | Extra objects to deploy with the release | |
There was a problem hiding this comment.
| | extraDeploys | list | `[]` | Extra objects to deploy with the release | | |
| | extraDeploy | list | `[]` | Extra objects to deploy with the release | |
There was a problem hiding this comment.
Or maybe we should keep extraDeploys everywhere?
Pull Request
Related issue
Fixes #292
What does this PR do?
PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!
Summary by CodeRabbit
New Features
Updates
✏️ Tip: You can customize this high-level summary in your review settings.